cmake_minimum_required(VERSION 3.16)
project(cpp_plugin_http_demo)

set(CMAKE_CXX_STANDARD 14) 

set(CMAKE_BUILD_TYPE "Debug")
set(CMAKE_INCLUDE_CURRENT_DIR ON)
# SET(CMAKE_CXX_FLAGS_DEBUG "$ENV{CXXFLAGS} -O0 -Wall -g -ggdb -Wl,-rpath=.")
SET(CMAKE_CXX_FLAGS_DEBUG "$ENV{CXXFLAGS} -O0 -Wall -g -ggdb -Wl,-rpath=. -Wl,--export-dynamic")   # 全局变量符号导出, 一定要加上 "-Wl,--export-dynamic",



# header file path
include_directories(.)
include_directories(${HOME}/core)

# source directory
aux_source_directory(. SRC_LIST)

# -L
link_directories(${HOME}/bin)

# build execute
add_executable(${PROJECT_NAME} ${SRC_LIST} ${COMMON_SRC_LIST} ${CORE_SRC_LIST})


# -l
target_link_libraries(${PROJECT_NAME} dl easyloggingcpp pthread)  # 不需要指定 libjd_plugin libqq_plugin, 因为是 dlopen() 加载的,
# target_link_libraries(${PROJECT_NAME} dl jd_plugin qq_plugin easyloggingcpp pthread)  # 不需要指定 libjd_plugin libqq_plugin, 因为是 dlopen() 加载的,

# set exe output path
SET(EXECUTABLE_OUTPUT_PATH  ${HOME}/bin)
